package ooday03;

public class InterfaceDemo {
    public static void main(String[] args) {

    }
}


//接口的语法
interface Inter{
    public abstract void show();
    void test(); //默认前面加 public abstract
    //void say(){} //编译错误,抽象类中不能有方法体
}

//演示接口的实现
interface Inter1{  //里面的方法默认前面加public abstract
    void show();
    void test();
}

class Aoo implements Inter1{
    public void show(){   //重写方法时,必须加 public
    }
    public void test(){
    }
}


//演示接口的多实现
interface Inter2{
    void show();
}
interface Inter3{
    void test();
}
abstract class Boo{
    abstract void say();
}

class Coo extends Boo implements Inter2,Inter3{
    public void show(){
    }
    public void test(){
    }
    void say(){
    }
}






















